﻿import Router from 'vue-router';
import user_index from "../user_index.vue";
const beginner_m_wrapper = r => require.ensure([], () => r(require('../../Adventure/BeginnerMode/beginner_m_wrapper.vue')));
const ad_list = r => require.ensure([], () => r(require('../../Adventure/ad_list.vue')));
import Advanture from "../../Adventure/Adventure_index.vue"
// const Advanture = r => require.ensure([], () => r(
//                                           require('../../Adventure/Adventure_index.vue'),
//                                           require("../../Adventure/Adventure_core.vue")
//                                       ));
const scroll_full = r => require.ensure([], () => r(require('../../Adventure/scroll_full.vue')));
const Advanture_visit = r => require.ensure([], () => r(require('../../Adventure/Adventure_index_visit.vue')));
const bg_get_img = r => require.ensure([], () => r(require('../../Adventure/BeginnerMode/bg_get_img.vue')));
const bg_get_voice = r =>require.ensure([], () => r(require('../../Adventure/BeginnerMode/bg_get_voice.vue')));
const bg_get_msg = r =>require.ensure([], () => r(require('../../Adventure/BeginnerMode/bg_get_msg.vue')));
const bg_get_msg_m = r =>require.ensure([], () => r(require('../../Adventure/BeginnerMode/bg_get_msg_m.vue')));
const default_card = r =>  require.ensure([], () => r(require("../../Adventure/default_card_show/default_card_show.vue")));
const common_card = r=> require.ensure([], () => r(require("../../Adventure/new_ad/input_ad.vue")));
export default new Router({
  routes: [
    {
      path: '/',
      redirect:"/user_index",
      meta: {
        //requireAuth: true,  // 添加该字段，表示进入这个路由是需要登录的
      },
    },
    {
        path: "/ad_list",
        component:ad_list
    },
    {
        path: "/user_index",
        component: user_index
    },
    {
        path:"/Advanture",
        component:Advanture
    },
    {
        path: "/Adventure_visit",
        component: Advanture_visit
    },
    {
        path: "/scroll_full",
        component: scroll_full
    },
    {
      path:'/beginner_m_wrapper',
      component:beginner_m_wrapper,
      children: [
        {
          // 当 /user/:id/profile 匹配成功，
          // UserProfile 会被渲染在 User 的 <router-view> 中
          path: 'bg_get_img',
          component: bg_get_img
        },
        {
          // 当 /user/:id/posts 匹配成功
          // UserPosts 会被渲染在 User 的 <router-view> 中
          path: 'bg_get_voice',
          component: bg_get_voice
        },
        {
          path:"bg_get_msg",
          component:bg_get_msg
        },
        {
          path:"bg_get_msg_m",
          component:bg_get_msg_m
        }
      ]
    },
    {
      path:"/default_card",
      component:default_card
    },
    {
      path:"/common_card",
      component:common_card
    }
    ],
})
